package cn.itsy.service.job;

import cn.itsy.dao.job.JobDao;
import cn.itsy.pojo.Emp;
import cn.itsy.pojo.Job;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @description:
 * @author: MisterGay
 * @date: 2019-05-28 9:15
 */
@Service(value = "jobServiceimpl")
public class JobServiceimpl implements JobService {
    @Resource(name = "jobDaoimpl")
    private JobDao jobDao;

    @Override
    public void deleteJobBuId(String sql, Integer dept_it) {
        this.jobDao.deleteJobById(sql, dept_it);
    }

    @Override
    public void insertJob(String sql, Job job) {
        this.jobDao.insertJob(sql, job);
    }

    @Override
    public List<Job> queryJobAll(String sql) {
        List<Job> jobs = this.jobDao.queryJobAll(sql);
        return jobs;
    }

    @Override
    public void updateJobById(String sql, Job job) {
        this.jobDao.updateJobById(sql, job);
    }

    @Override
    public void updateJobById(String sql, Job job, Integer checkId) {
        this.jobDao.updateJobById(sql, job, checkId);
    }

    @Override
    public void updateEmpByJobId(String sql, Job job, Integer checkId) {
        this.jobDao.updateEmpByJobId(sql, job, checkId);
    }

    @Override
    public List<Emp> queryEmpById(String sql, Job job) {
        List<Emp> emps = this.jobDao.queryEmpById(sql, job);
        return emps;
    }

    @Override
    public void deleteJobById(String sql, Job job) {
        this.jobDao.deleteJobById(sql, job);
    }


}
